#!/usr/bin/perl

foreach my $file(glob "*")
{
    my $newFile=$file;

    $newFile =~ tr/[A-Z]/[a-z]/; #change upcase letter to low case letter.

    #if new file name is existed.
    if (-e $newFile)
    {
        warn "The $newFile exists!\n";
    }
    else
    {
        rename $file,$newFile
            or
            warn "Rename $file to $newFile failed:$!\n";
    }

    print $newFile."\n";
}

